var db = require("../models");
var sequelize = db.sequelize;

var Role =db['role'];
var role_id = "xxxxxddddccccxdddc";
var role_role = "role:admin"
sequelize.transaction(function(t) {
    return Role.create({
        id: role_id,
        role: role_role
        }
    ).then(function() {
        console.log("i AM OK ===");
        return Role.create({id: "ccdd123dd", role:"abc"})
    }).then(function(role) {
        console.log("role is " + role.id)
        return "hellow"
    });
}).then(function(reset) {
    console.log(reset)
}).catch(function() {
    console.log("error meet")
});
